package pwd.allen.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import org.springframework.stereotype.Service;
import pwd.allen.entity.Company;
import pwd.allen.entity.Department;
import pwd.allen.mapper.CompanyMapper;
import pwd.allen.mapper.DeptMapper;
import pwd.allen.service.ICompanyService;
import pwd.allen.service.IDeptService;

import java.util.List;

/**
 * @author 门那粒沙
 * @create 2020-06-20 22:01
 **/
@DS("oracle_1")
@Service
public class CompanyService extends BaseService<CompanyMapper, Company> implements ICompanyService {

    @Override
    public int insertBatchOne(List<Company> list) {
        return execBatch(list, param -> baseMapper.insertBatchOne(param), 500);
    }

    @Override
    public int insertBatchTwo(List<Company> list) {
        return execBatch(list, param -> baseMapper.insertBatchTwo(param), 500);
    }

    @Override
    public int insertBatchThree(List<Company> list) {
        return execBatch(list, param -> baseMapper.insertBatchThree(param), 500);
    }

}
